<template>
  <div class="">
    <report-list :reportinfoList="reportinfoList" :routeLink="routeLink"></report-list>
  </div>
  <!-- <div class="formlist_box">
    <el-row :gutter="15">
      <el-col :span="4" v-for="item in reportinfoList">
        <el-card style="height:200px;margin-top:12px">
          <div slot="header" class="clearfix">
            <span>{{item.name}}</span>
            <el-button style="float: right; padding: 3px 0" type="text" @click="routeLink(item.id)">查看</el-button>
          </div>
          <div class="formlist_boxDetails">
            <p>创建时间：{{item.createTime}}</p>
            <p>名称：{{item.name}}</p>
            <p>版本号：{{item.version}}</p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div> -->
</template>
<script>
import reportList from './components/reportlist'
export default {
  data(){
    return{
      reportinfoList:'',
      companyIds:this.$store.getters.companyId,
      uid:this.$store.getters.userUid,
      idGruop:''
    }
  },
  methods:{
    routeLink(id,name){
      // this.$router.push('/forms/details/' + params:{id,name})
      this.$router.push({path:'/forms/details/',query:{id:id,name:name} })
    },
    get_reportList(){
      this.$post("/roleReport/getReportList",{companyid:this.companyIds,type:1,uid:this.uid},data => {
           this.reportinfoList = data;
        },error => {
          this.$message.error(error);
      });
    }
  },
  components:{
    reportList
  },
  created(){
    this.get_reportList();
  }
}
</script>